<?php $base_path = Yii::app()->baseUrl; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Login to system</title>
        <link href="<?php echo $base_path ?>/css/admin/style.css" rel="stylesheet" />
        <link href="<?php echo $base_path ?>/css/admin/facebox.css" rel="stylesheet" />
        <link href="<?php echo $base_path ?>/css/admin/facebox.css" rel="stylesheet" />
        <link href="<?php echo $base_path ?>/css/admin/visualize.css" rel="stylesheet" />
        <link href="<?php echo $base_path ?>/css/admin/date_input.css" rel="stylesheet" />        
    </head>
    <body>
        <div id="hld">
            <div class="wrapper">
                <div class="block small center login">
                    <div class="block_head">
                        <div class="bheadl"></div>
                        <div class="bheadr"></div>
                        <h2>Login</h2>
                        <ul>
                            <li><a href="<?php echo $this->createUrl('search/index') ?>">back to the site</a></li>
                        </ul>
                    </div>
                    <div class="block_content">
                        <?php
                            $info = Yii::app()->request->cookies['login_memberme'];                            
                            if (!empty($info)) {
                                $info = unserialize($info);
                            }
                            $msg = Yii::app()->session['msg'];
                            if (!empty($msg)) {
                                echo '<div class="message warning">' . $msg . '</div>';
                                unset(Yii::app()->session['msg']);
                            }
                        ?>
                        <form action="" method="POST">
                            <p>
                                <label>Email:</label> <br />
                                <input type="text" class="text" value="<?php if(!empty($info)) echo $info['email']; ?>" name="email" />
                            </p>
                            <p>
                                <label>Password:</label> <br />
                                <input type="password" class="text" value="<?php if(!empty($info)) echo $info['password']; ?>" name="password" />
                            </p>
                            <p>
                                <input type="submit" class="submit" value="Login" /> &nbsp; 
                                <input <?php if(!empty($info)) echo 'checked=""'; ?> type="checkbox" class="checkbox" id="rememberme" name="rememberme" value="1" /> <label for="rememberme">Remember me</label>
                            </p>
                        </form>
                    </div>
                    <div class="bendl"></div>
                    <div class="bendr"></div>
                </div>
            </div>
        </div>
        <script type="text/javascript" src="<?php echo $base_path ?>/js/jquery.js"></script>		
        <script type="text/javascript" src="<?php echo $base_path ?>/js/admin/jquery.wysiwyg.js"></script>
        <script type="text/javascript" src="<?php echo $base_path ?>/js/admin/facebox.js"></script>	
        <script type="text/javascript" src="<?php echo $base_path ?>/js/admin/jquery.tablesorter.min.js"></script>	
        <script type="text/javascript" src="<?php echo $base_path ?>/js/admin/jquery.pngfix.js"></script>
        <script type="text/javascript">
            $(function () {		
                // Messages
                $('.block .message').hide().append('<span class="close" title="Dismiss"></span>').fadeIn('slow');
                $('.block .message .close').hover(
                function() {
                    $(this).addClass('hover');
                },
                function() {
                    $(this).removeClass('hover');
                }
            );
		
                $('.block .message .close').click(function() {
                    $(this).parent().fadeOut('slow', function() {
                        $(this).remove();
                    });
                });
                // IE6 PNG fix
                $(document).pngFix();		
            });    
        </script>
    </body>
</html>